package com.static_step.consultant.controller;

import com.static_step.consultant.aiservice.ConsultantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Flux;

@RestController
public class ChatController {
    @Autowired
    private ConsultantService consultantService;

    @RequestMapping("/chatFlux")
    public Flux<String> chatFlux(String memoryId, String message) {
        return consultantService.chatFlux(memoryId, message);
    }

//    @RequestMapping("/chat")
//    public String chat(String message) {
//        return consultantService.chat(message);
//    }


//    @Autowired
//    private OpenAiChatModel openAiChatModel;
//
//    @RequestMapping("/chat")
//    public String chat(String message) {
//        String result = openAiChatModel.chat(message);
//        return result;
//    }
}
